import request from '@/utils/request'

const URL = 'op/room'

// 新增房间信息
export function addRoom(form) {
  return request({
    url: URL + '/add',
    method: 'post',
    data: form
  })
}

// 更新/编辑房间信息
export function editRoom(form) {
  return request({
    url: URL + '/update',
    method: 'post',
    data: form
  })
}

// 删除房间信息
export function delRoom(roomId) {
  return request({
    url: URL + '/delete/' + roomId,
    method: 'post',
    data: {

    }
  })
}

// 根据房间id获取房间信息
export function getRoomById(roomId) {
  return request({
    url: URL + '/' + roomId,
    method: 'get',
    data: {
      roomId
    }
  })
}

// 获得所有房间
export function getAllRoom() {
  return request({
    url: URL,
    method: 'get'
  })
}

